<?PHP
  $template = new Template();
  $template->load("menus");
  $template->assign_var("NEWMENUURL","/admin/index.php?page=menue-new");
  foreach(sys::getMenues() as $menu){
    $index = $template->add_loop_item("MENUS");
	$template->assign_loop_var("MENUS", $index, "ID", $menu->id);
	$template->assign_loop_var("MENUS", $index, "NAME", $menu->name);
	$template->assign_loop_var("MENUS", $index, "PAGES", $menu->count);
	$template->assign_loop_var("MENUS", $index, "EDITURL", "index.php?page=menu-edit&menu=".$menu->id);
	$template->assign_loop_var("MENUS", $index, "DELETEURL", "index.php?page=menu-delete&menu=".$menu->id);
  }
  $template->output();
?>